package com.thysdy.flowable.common;

import com.thysdy.flowable.vo.PsndocUserVo;
import com.thysdy.flowable.entity.ActIdUser;

import java.util.Map;

public class PersonInfoUtil {

    public static String getPersonNameString(Map<String, PsndocUserVo> map) {
        String nameString = "";
        int i = 0;
        for (String key : map.keySet()) {
            nameString = nameString + map.get(key).getName();
            i++;
            if (i != map.size()) {
                nameString = nameString + ",";
            }
        }
        return nameString;
    }

    public static String getUserNameString(Map<String, ActIdUser> map) {
        String userNameString = "";
        int i = 0;
        for (String key : map.keySet()) {
            userNameString = userNameString + map.get(key).getFirst() + null != map.get(key).getTel() ? map.get(key).getTel() : "";
            i++;
            if (i != map.size()) {
                userNameString = userNameString + ",";
            }
        }
        return userNameString;
    }
}
